package com.qianfeng.pojo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.List;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/9/16 14:09
 */
public class BaseUser extends User {
    private Long userId;


    private List<SysRole> roleList;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public List<SysRole> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<SysRole> roleList) {
        this.roleList = roleList;
    }

    public BaseUser(String username, String password, Collection<? extends GrantedAuthority> authorities,Long userId) {
        super(username, password, authorities);
        this.userId=userId;
    }

    public BaseUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }
}
